Optimal. Leaf size=274 \[ \frac {35 (3 i A+B) \tanh ^{-1}\left (\frac {\sqrt {c-i c \tan (e+f x)}}{\sqrt {2} \sqrt {c}}\right )}{256 \sqrt {2} a^3 c^{3/2} f}-\frac {35 (3 i A+B)}{384 a^3 f (c-i c \tan (e+f x))^{3/2}}+\frac {i A-B}{6 a^3 f (1+i \tan (e+f x))^3 (c-i c \tan (e+f x))^{3/2}}+\frac {3 i A+B}{16 a^3 f (1+i \tan (e+f x))^2 (c-i c \tan (e+f x))^{3/2}}+\frac {7 (3 i A+B)}{64 a^3 f (1+i \tan (e+f x)) (c-i c \tan (e+f x))^{3/2}}-\frac {35 (3 i A+B)}{256 a^3 c f \sqrt {c-i c \tan (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.21, antiderivative size = 274, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 6, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.140, Rules used = {3669, 79, 44,
53, 65, 214} \begin {gather*} \frac {35 (B+3 i A) \tanh ^{-1}\left (\frac {\sqrt {c-i c \tan (e+f x)}}{\sqrt {2} \sqrt {c}}\right )}{256 \sqrt {2} a^3 c^{3/2} f}+\frac {-B+i A}{6 a^3 f (1+i \tan (e+f x))^3 (c-i c \tan (e+f x))^{3/2}}-\frac {35 (B+3 i A)}{256 a^3 c f \sqrt {c-i c \tan (e+f x)}}-\frac {35 (B+3 i A)}{384 a^3 f (c-i c \tan (e+f x))^{3/2}}+\frac {7 (B+3 i A)}{64 a^3 f (1+i \tan (e+f x)) (c-i c \tan (e+f x))^{3/2}}+\frac {B+3 i A}{16 a^3 f (1+i \tan (e+f x))^2 (c-i c \tan (e+f x))^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 44
Rule 53
Rule 65
Rule 79
Rule 214
Rule 3669
Rubi steps
\begin {align*} \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^{3/2}} \, dx &=\frac {(a c) \text {Subst}\left (\int \frac {A+B x}{(a+i a x)^4 (c-i c x)^{5/2}} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {i A-B}{6 a^3 f (1+i \tan (e+f x))^3 (c-i c \tan (e+f x))^{3/2}}+\frac {((3 A-i B) c) \text {Subst}\left (\int \frac {1}{(a+i a x)^3 (c-i c x)^{5/2}} \, dx,x,\tan (e+f x)\right )}{4 f}\\ &=\frac {i A-B}{6 a^3 f (1+i \tan (e+f x))^3 (c-i c \tan (e+f x))^{3/2}}+\frac {3 i A+B}{16 a^3 f (1+i \tan (e+f x))^2 (c-i c \tan (e+f x))^{3/2}}+\frac {(7 (3 A-i B) c) \text {Subst}\left (\int \frac {1}{(a+i a x)^2 (c-i c x)^{5/2}} \, dx,x,\tan (e+f x)\right )}{32 a f}\\ &=\frac {i A-B}{6 a^3 f (1+i \tan (e+f x))^3 (c-i c \tan (e+f x))^{3/2}}+\frac {3 i A+B}{16 a^3 f (1+i \tan (e+f x))^2 (c-i c \tan (e+f x))^{3/2}}+\frac {7 (3 i A+B)}{64 a^3 f (1+i \tan (e+f x)) (c-i c \tan (e+f x))^{3/2}}+\frac {(35 (3 A-i B) c) \text {Subst}\left (\int \frac {1}{(a+i a x) (c-i c x)^{5/2}} \, dx,x,\tan (e+f x)\right )}{128 a^2 f}\\ &=-\frac {35 (3 i A+B)}{384 a^3 f (c-i c \tan (e+f x))^{3/2}}+\frac {i A-B}{6 a^3 f (1+i \tan (e+f x))^3 (c-i c \tan (e+f x))^{3/2}}+\frac {3 i A+B}{16 a^3 f (1+i \tan (e+f x))^2 (c-i c \tan (e+f x))^{3/2}}+\frac {7 (3 i A+B)}{64 a^3 f (1+i \tan (e+f x)) (c-i c \tan (e+f x))^{3/2}}+\frac {(35 (3 A-i B)) \text {Subst}\left (\int \frac {1}{(a+i a x) (c-i c x)^{3/2}} \, dx,x,\tan (e+f x)\right )}{256 a^2 f}\\ &=-\frac {35 (3 i A+B)}{384 a^3 f (c-i c \tan (e+f x))^{3/2}}+\frac {i A-B}{6 a^3 f (1+i \tan (e+f x))^3 (c-i c \tan (e+f x))^{3/2}}+\frac {3 i A+B}{16 a^3 f (1+i \tan (e+f x))^2 (c-i c \tan (e+f x))^{3/2}}+\frac {7 (3 i A+B)}{64 a^3 f (1+i \tan (e+f x)) (c-i c \tan (e+f x))^{3/2}}-\frac {35 (3 i A+B)}{256 a^3 c f \sqrt {c-i c \tan (e+f x)}}+\frac {(35 (3 A-i B)) \text {Subst}\left (\int \frac {1}{(a+i a x) \sqrt {c-i c x}} \, dx,x,\tan (e+f x)\right )}{512 a^2 c f}\\ &=-\frac {35 (3 i A+B)}{384 a^3 f (c-i c \tan (e+f x))^{3/2}}+\frac {i A-B}{6 a^3 f (1+i \tan (e+f x))^3 (c-i c \tan (e+f x))^{3/2}}+\frac {3 i A+B}{16 a^3 f (1+i \tan (e+f x))^2 (c-i c \tan (e+f x))^{3/2}}+\frac {7 (3 i A+B)}{64 a^3 f (1+i \tan (e+f x)) (c-i c \tan (e+f x))^{3/2}}-\frac {35 (3 i A+B)}{256 a^3 c f \sqrt {c-i c \tan (e+f x)}}+\frac {(35 (3 i A+B)) \text {Subst}\left (\int \frac {1}{2 a-\frac {a x^2}{c}} \, dx,x,\sqrt {c-i c \tan (e+f x)}\right )}{256 a^2 c^2 f}\\ &=\frac {35 (3 i A+B) \tanh ^{-1}\left (\frac {\sqrt {c-i c \tan (e+f x)}}{\sqrt {2} \sqrt {c}}\right )}{256 \sqrt {2} a^3 c^{3/2} f}-\frac {35 (3 i A+B)}{384 a^3 f (c-i c \tan (e+f x))^{3/2}}+\frac {i A-B}{6 a^3 f (1+i \tan (e+f x))^3 (c-i c \tan (e+f x))^{3/2}}+\frac {3 i A+B}{16 a^3 f (1+i \tan (e+f x))^2 (c-i c \tan (e+f x))^{3/2}}+\frac {7 (3 i A+B)}{64 a^3 f (1+i \tan (e+f x)) (c-i c \tan (e+f x))^{3/2}}-\frac {35 (3 i A+B)}{256 a^3 c f \sqrt {c-i c \tan (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 3.31, size = 206, normalized size = 0.75 \begin {gather*} \frac {(i \cos (e+f x)+\sin (e+f x)) \left (105 (3 A-i B) e^{i (e+f x)} \sqrt {1+e^{2 i (e+f x)}} \tanh ^{-1}\left (\sqrt {1+e^{2 i (e+f x)}}\right )-2 \cos (e+f x) (-165 A-9 i B+2 (79 A-69 i B) \cos (2 (e+f x))+8 (A-3 i B) \cos (4 (e+f x))+258 i A \sin (2 (e+f x))+86 B \sin (2 (e+f x))+24 i A \sin (4 (e+f x))+8 B \sin (4 (e+f x)))\right ) \sqrt {c-i c \tan (e+f x)}}{1536 a^3 c^2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.35, size = 205, normalized size = 0.75
method | result | size |
derivativedivides | \(\frac {2 i c^{3} \left (-\frac {-i B +2 A}{16 c^{4} \sqrt {c -i c \tan \left (f x +e \right )}}-\frac {-i B +A}{48 c^{3} \left (c -i c \tan \left (f x +e \right )\right )^{\frac {3}{2}}}+\frac {\frac {8 \left (-\frac {3 i B}{256}+\frac {41 A}{256}\right ) \left (c -i c \tan \left (f x +e \right )\right )^{\frac {5}{2}}+8 \left (\frac {1}{48} i B c -\frac {35}{48} A c \right ) \left (c -i c \tan \left (f x +e \right )\right )^{\frac {3}{2}}+8 \left (\frac {3}{64} i B \,c^{2}+\frac {55}{64} A \,c^{2}\right ) \sqrt {c -i c \tan \left (f x +e \right )}}{\left (c +i c \tan \left (f x +e \right )\right )^{3}}+\frac {35 \left (\frac {3 A}{8}-\frac {i B}{8}\right ) \sqrt {2}\, \arctanh \left (\frac {\sqrt {c -i c \tan \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {c}}\right )}{8 \sqrt {c}}}{16 c^{4}}\right )}{f \,a^{3}}\) | \(205\) |
default | \(\frac {2 i c^{3} \left (-\frac {-i B +2 A}{16 c^{4} \sqrt {c -i c \tan \left (f x +e \right )}}-\frac {-i B +A}{48 c^{3} \left (c -i c \tan \left (f x +e \right )\right )^{\frac {3}{2}}}+\frac {\frac {8 \left (-\frac {3 i B}{256}+\frac {41 A}{256}\right ) \left (c -i c \tan \left (f x +e \right )\right )^{\frac {5}{2}}+8 \left (\frac {1}{48} i B c -\frac {35}{48} A c \right ) \left (c -i c \tan \left (f x +e \right )\right )^{\frac {3}{2}}+8 \left (\frac {3}{64} i B \,c^{2}+\frac {55}{64} A \,c^{2}\right ) \sqrt {c -i c \tan \left (f x +e \right )}}{\left (c +i c \tan \left (f x +e \right )\right )^{3}}+\frac {35 \left (\frac {3 A}{8}-\frac {i B}{8}\right ) \sqrt {2}\, \arctanh \left (\frac {\sqrt {c -i c \tan \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {c}}\right )}{8 \sqrt {c}}}{16 c^{4}}\right )}{f \,a^{3}}\) | \(205\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.54, size = 273, normalized size = 1.00 \begin {gather*} -\frac {i \, {\left (\frac {4 \, {\left (105 \, {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{4} {\left (3 \, A - i \, B\right )} - 560 \, {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{3} {\left (3 \, A - i \, B\right )} c + 924 \, {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{2} {\left (3 \, A - i \, B\right )} c^{2} - 384 \, {\left (-i \, c \tan \left (f x + e\right ) + c\right )} {\left (3 \, A - i \, B\right )} c^{3} - 256 \, {\left (A - i \, B\right )} c^{4}\right )}}{{\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{\frac {9}{2}} a^{3} - 6 \, {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{\frac {7}{2}} a^{3} c + 12 \, {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{\frac {5}{2}} a^{3} c^{2} - 8 \, {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{\frac {3}{2}} a^{3} c^{3}} + \frac {105 \, \sqrt {2} {\left (3 \, A - i \, B\right )} \log \left (-\frac {\sqrt {2} \sqrt {c} - \sqrt {-i \, c \tan \left (f x + e\right ) + c}}{\sqrt {2} \sqrt {c} + \sqrt {-i \, c \tan \left (f x + e\right ) + c}}\right )}{a^{3} \sqrt {c}}\right )}}{3072 \, c f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.36, size = 453, normalized size = 1.65 \begin {gather*} \frac {{\left (105 \, \sqrt {\frac {1}{2}} a^{3} c^{2} f \sqrt {-\frac {9 \, A^{2} - 6 i \, A B - B^{2}}{a^{6} c^{3} f^{2}}} e^{\left (6 i \, f x + 6 i \, e\right )} \log \left (\frac {35 \, {\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (a^{3} c f e^{\left (2 i \, f x + 2 i \, e\right )} + a^{3} c f\right )} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {9 \, A^{2} - 6 i \, A B - B^{2}}{a^{6} c^{3} f^{2}}} + 3 i \, A + B\right )} e^{\left (-i \, f x - i \, e\right )}}{128 \, a^{3} c f}\right ) - 105 \, \sqrt {\frac {1}{2}} a^{3} c^{2} f \sqrt {-\frac {9 \, A^{2} - 6 i \, A B - B^{2}}{a^{6} c^{3} f^{2}}} e^{\left (6 i \, f x + 6 i \, e\right )} \log \left (-\frac {35 \, {\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (a^{3} c f e^{\left (2 i \, f x + 2 i \, e\right )} + a^{3} c f\right )} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {9 \, A^{2} - 6 i \, A B - B^{2}}{a^{6} c^{3} f^{2}}} - 3 i \, A - B\right )} e^{\left (-i \, f x - i \, e\right )}}{128 \, a^{3} c f}\right ) - \sqrt {2} {\left (16 \, {\left (i \, A + B\right )} e^{\left (10 i \, f x + 10 i \, e\right )} + 32 \, {\left (7 i \, A + 4 \, B\right )} e^{\left (8 i \, f x + 8 i \, e\right )} - {\left (-43 i \, A - 121 \, B\right )} e^{\left (6 i \, f x + 6 i \, e\right )} + 5 \, {\left (-43 i \, A + 7 \, B\right )} e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, {\left (-29 i \, A + 17 \, B\right )} e^{\left (2 i \, f x + 2 i \, e\right )} - 8 i \, A + 8 \, B\right )} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-6 i \, f x - 6 i \, e\right )}}{1536 \, a^{3} c^{2} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {i \left (\int \frac {A}{- i c \sqrt {- i c \tan {\left (e + f x \right )} + c} \tan ^{4}{\left (e + f x \right )} - 2 c \sqrt {- i c \tan {\left (e + f x \right )} + c} \tan ^{3}{\left (e + f x \right )} - 2 c \sqrt {- i c \tan {\left (e + f x \right )} + c} \tan {\left (e + f x \right )} + i c \sqrt {- i c \tan {\left (e + f x \right )} + c}}\, dx + \int \frac {B \tan {\left (e + f x \right )}}{- i c \sqrt {- i c \tan {\left (e + f x \right )} + c} \tan ^{4}{\left (e + f x \right )} - 2 c \sqrt {- i c \tan {\left (e + f x \right )} + c} \tan ^{3}{\left (e + f x \right )} - 2 c \sqrt {- i c \tan {\left (e + f x \right )} + c} \tan {\left (e + f x \right )} + i c \sqrt {- i c \tan {\left (e + f x \right )} + c}}\, dx\right )}{a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 9.98, size = 443, normalized size = 1.62 \begin {gather*} -\frac {\frac {A\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^3\,35{}\mathrm {i}}{16\,a^3\,f}+\frac {A\,c^3\,1{}\mathrm {i}}{3\,a^3\,f}-\frac {A\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^4\,105{}\mathrm {i}}{256\,a^3\,c\,f}-\frac {A\,c\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^2\,231{}\mathrm {i}}{64\,a^3\,f}+\frac {A\,c^2\,\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )\,3{}\mathrm {i}}{2\,a^3\,f}}{6\,c\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{7/2}-{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{9/2}+8\,c^3\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{3/2}-12\,c^2\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{5/2}}+\frac {\frac {B\,c^3}{3}+\frac {35\,B\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^3}{48}-\frac {77\,B\,c\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^2}{64}+\frac {B\,c^2\,\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}{2}-\frac {35\,B\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^4}{256\,c}}{a^3\,f\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{9/2}-6\,a^3\,c\,f\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{7/2}-8\,a^3\,c^3\,f\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{3/2}+12\,a^3\,c^2\,f\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{5/2}}+\frac {\sqrt {2}\,A\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {-c}}\right )\,105{}\mathrm {i}}{512\,a^3\,{\left (-c\right )}^{3/2}\,f}+\frac {35\,\sqrt {2}\,B\,\mathrm {atanh}\left (\frac {\sqrt {2}\,\sqrt {c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {c}}\right )}{512\,a^3\,c^{3/2}\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________